package com.linkallcloud.web.utils;

import java.time.Duration;
import java.util.Date;

import javax.servlet.http.HttpServletRequest;

import com.linkallcloud.core.dto.Trace;
import com.linkallcloud.core.pagination.Page;
import com.linkallcloud.core.vo.OnlineUser;
import com.linkallcloud.core.www.ISimpleUser;

public interface IOnlineHelper {

    public String getAppCode();

    public String login(ISimpleUser su, Duration timeout);
    public void logout(String token);
    public void logout(HttpServletRequest request);
    public void offline(String loginName);

    
    public ISimpleUser getSessionUser(HttpServletRequest request);
    public OnlineUser getUser(String loginName);

    public Long clear();

    public Long count();

    public Long count(Date start, Date end);

    public Page<OnlineUser> getPage(Trace t, Page<OnlineUser> page);

}
